package com.home;

import com.controller.ShootGame;

import javax.swing.*;

public class Home {

    public static void main(String[] args) {
        JFrame jFrame = new JFrame();
        ShootGame shootGame = new ShootGame();
        jFrame.add(shootGame);//添加画板
        jFrame.setTitle("飞机大战");//窗体标题
        jFrame.setSize(ShootGame.WIDTH, ShootGame.HEIGHT);//窗体宽高
        jFrame.setLocationRelativeTo(null);//设置居中
        jFrame.setAlwaysOnTop(true);//显示在所有窗体上面
        jFrame.setResizable(false);//窗体不可缩放
        jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//关闭窗体
        jFrame.setVisible(true);//窗体可见
        shootGame.action();//飞行物运动方法
    }
}
